/*
 * Copyright (c) zhg2yqq.com Corp.
 * All Rights Reserved.
 */
package com.zhg2yqq.wheels.security.constants;

import com.zhg2yqq.wheels.common.response.IResponseCode;

/**
 * @author zhg2yqq, 2023年2月21日
 * @version zhg2yqq v1.0
 */
public enum SecurityResponseCode implements IResponseCode {
    SECURITY_ERROR_TOKEN("100000", "Token非法或已过期"),
    SECURITY_INVALID_TOKEN("100001", "非法Token，请重新登录"),
    SECURITY_IS_ANONYMOUS("100002", "用户未登录，请登录后进行访问"),
    SECURITY_IS_TIMEOUT("100003", "登录已失效，自动退出"),
    SECURITY_MAX_LOGIN("100004", "该用户已在其它地方登录"),
    SECURITY_ACCOUNT_EXPIRED("100005", "用户账号过期"),
    SECURITY_PASSWORD_EXPIRED("100006", "用户密码过期"),
    SECURITY_PASSWORD_ERROR("100007", "用户名或密码错误"),
    SECURITY_USER_DISABLED("100008", "用户被禁用"),
    SECURITY_USER_LOCKED("100009", "用户被锁定"),
    SECURITY_NO_AUTHENTICATION("100010", "无权访问"),
    SECURITY_CODE_ERROR("100011", "验证码错误或已过期"),
    SECURITY_AUTHORIZATION_FAIL("100099", "用户登录失败");

    private String code;
    private String description;

    private SecurityResponseCode(String code, String description) {
        this.code = code;
        this.description = description;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getDescription() {
        return description;
    }
}
